#!/usr/bin/perl -w

#  FILE:   community.pl
#  AUTHOR: Ruth Cobos
#  DATE:   15/02/01
#
#  DESCRIPTION: Muestra la comunidad de expertos.

#inicializar:
require ("init.pl");
require ("dbData.pl");
require ("dbStruct.pl");
require "gui.pl";

#imprimir cabecera
&print_header;

#Se procesa la entrada al script
%input = &parse_input;

#Se obtienen los datos de entrada
$dbName = $input{b};
$idTopic = $input{t};
$idUser = $input{u};

#Se obtiene la fase actual
$phase = &get_phase($dbName);

if ($phase == 0)
{
  $idStructure = $input{s};
}
if ($phase == 1)
{
  $idStructure = 0;
}

($dbLanguage, $IMG) = &get_language($dbName);
#Obtener los datos de la leyenda
%data = &get_data($dbLanguage, "Message", "name", "\'legend\'");
$legend = $data{'txt'.1};
%data = &get_data($dbLanguage, "Message", "name", "\'communityF\'");
$communityF = $data{'txt'.1};
%data = &get_data($dbLanguage, "Message", "name", "\'communityR\'");
$communityR = $data{'txt'.1};

print "<HTML>\n<HEAD><BASE TARGET=\"descriptions\"></HEAD>\n<BODY BGCOLOR=\"#FFFFFF\" BACKGROUND=\"../" . $IMG . "/kc.gif\">\n";
print "<FONT SIZE=\"-1\">";
#&showTreeCommunities($dbName, $idTopic, $idUser, $idStructure);

&showNewTreeCommunities($dbName, 0, $idTopic, $idUser, $idStructure);
print "</FONT>";

print <<EOF1;
<BR><HR>
<table border="0" width="255">
  <tr>
    <td width="100%" bgcolor=$spaceColors{dark_2}> 
      <p align="center"><b><font color="#000000" face="Arial">$legend</font></b> 
    </td>
  </tr>
  <tr>
    <td width="100%" bgcolor=$spaceColors{bright_2}><IMG SRC="imgTreeJS/folderGreen.gif" width="19" height="16"> 
      <b> <font color="#000000" face="Arial" size="2">$communityF</font></b><font color="#000000"><BR>      
      <IMG SRC="imgTreeJS/folderRed.gif" width="19" height="16"> <font face="Arial" size="2"><b>$communityR
      </b></font></font></td>
  </tr>
</table>
</BODY></HTML>
EOF1
;


